/**
 * 用户页面相关API
 */
import request from "@/utils/request";
import env from "@/utils/env";
import { getItem } from "@/utils/localStorage";

// 最新推荐
export const wxLogin = (data) => {
  return request({
    url: "/cloth/client/login",
    method: "POST",
    data,
  });
};

// 用户点赞的客片详情
// export const userLoveGuestFilmList = (
//   clientId = 1,
//   pageNo = 1,
//   pageSize = 10,
//   shopId = 2
// ) => {
//   return request({
//     url: `/cloth/client/getGuestImages?clientId=${clientId}&pageNo=${pageNo}&pageSize=${pageSize}&shopId=${shopId}`,
//     method: "GET",
//   });
// };
export const userLoveGuestFilmList = (
  clientId = 1,
  pageNo = 1,
  pageSize = 10
) => {
  return request({
    url: `/cloth/client/getGuestImages?clientId=${clientId}&pageNo=${pageNo}&pageSize=${pageSize}`,
    method: "GET",
  });
};

// 修改昵称
export const updateNickname = (data) => {
  return request({
    url: "/cloth/client/update/username",
    method: "POST",
    data,
  });
};

// 全部订单
export const getOrderInfoVo = (userId, pageNo = 1, pageSize = 10) => {
  return request({
    url: `/cloth/order/getOrderInfoVo?userId=${userId}&pageNo=${pageNo}&pageSize=${pageSize}`,
    method: "GET",
  });
};

// 修改店铺ID
export const updateShopId = (data) => {
  return request({
    url: "/cloth/client/update/username",
    method: "POST",
    data,
  });
};
